Skip to content

fix(traverse): pg-proto-parser is a build-time dependency - #376

Merged
pyramation merged 1 commit into
mainfrom
fix/traverse-runtime-deps
Nov 8, 2026
Merged

pyramation merged 1 commit into
mainfrom
fix/traverse-runtime-deps

Conversation

@pyramation

Copy link
Copy Markdown
Collaborator

Summary

@pgsql/traverse listed pg-proto-parser under dependencies, but only scripts/pg-proto-parser.ts (build:proto) imports it. The published src/18/runtime-schema.ts mentions it only in its "generated by" header. Because the dependency was declared at runtime, every consumer of @pgsql/traverse also installed pg-proto-parser and its @launchql/protobufjs fork, plus @babel/*. That includes @pgsql/lint, @pgsql/transform, @pgsql/semantics and plpgsql-parser. It's the only reason the @launchql scope still shows up in downstream lockfiles and pnpm policies.

 "dependencies": {
   "@pgsql/types": "^18.0.0",
-  "pg-proto-parser": "workspace:*",
   "plpgsql-deparser": "workspace:*"
 },
 "devDependencies": {
-  "makage": "^0.5.1"
+  "makage": "^0.5.1",
+  "pg-proto-parser": "workspace:*"
 }

This matches how @pgsql/utils and @pgsql/transform-ast already declare it. The PR also replaces pg-proto-parser's npm description, which read "The LaunchQL Proto parser".

Verified:

  • pnpm install --frozen-lockfile passes. The lockfile edit only moves the importer entry.
  • packages/traverse/dist has no require/import of pg-proto-parser or protobufjs.
  • The traverse jest suite passes (36/36).

After publish, downstream repos drop @launchql/protobufjs on their next @pgsql/* bump.

Link to Devin session: https://app.devin.ai/sessions/10c9e261a5334448b61df498ecd447d1
Open in Devin Desktop: https://app.devin.ai/desktop/session/10c9e261a5334448b61df498ecd447d1?variant=devin
Requested by: @pyramation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@tenki-reviewer

tenki-reviewer Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Review complete. No blocking issues — approved ✅; 1 nitpick below.

🧹 Nitpicks (1) — 🟢 1 low
  • 🟢 Bump @pgsql/traverse version with the manifest change (package.json:3) — The dependency reclassification in packages/traverse/package.json (pg-proto-parser moved to devDependencies) alters the published manifest, but the package version is not bumped in this change.

A small manifest-only maintenance PR. pg-proto-parser gets an accurate npm description, and @pgsql/traverse reclassifies pg-proto-parser as a build-time devDependency since no shipped runtime source imports it — scripts/pg-proto-parser.ts is only used by the ts-node build:proto pipeline. Traversal behavior is unchanged.

Files Change
packages/proto-parser/package.json Replaces the stale "The LaunchQL Proto parser" description with one describing the package's actual purpose.
packages/traverse/package.json Moves pg-proto-parser from dependencies to devDependencies, keeping the same workspace:* range.

Reviewed commit: 2e57b32

@pyramation
pyramation merged commit 046e4d9 into main Nov 8, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant